broadway: Stop using the query_state vfunc
authorMatthias Clasen <mclasen@redhat.com>
Wed, 26 Aug 2020 20:03:31 +0000 (16:03 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 26 Aug 2020 21:56:41 +0000 (17:56 -0400)
Just call the backend implementation directly.

gdk/broadway/gdkdevice-broadway.c
gdk/broadway/gdkdevice-broadway.h
gdk/broadway/gdksurface-broadway.c

index 8ed1a9ccf481cbb927bf80185aef220c66671248..cbcf5d6e79e06b00441d07efab4c90fcd6b1c809 100644 (file)
 static void gdk_broadway_device_set_surface_cursor (GdkDevice *device,
                                                     GdkSurface *surface,
                                                     GdkCursor *cursor);
-static void gdk_broadway_device_query_state (GdkDevice        *device,
-                                             GdkSurface       *surface,
-                                             GdkSurface      **child_surface,
-                                             double           *win_x,
-                                             double           *win_y,
-                                             GdkModifierType  *mask);
 static GdkGrabStatus gdk_broadway_device_grab   (GdkDevice     *device,
                                                  GdkSurface     *surface,
                                                  gboolean       owner_events,
@@ -55,7 +49,6 @@ gdk_broadway_device_class_init (GdkBroadwayDeviceClass *klass)
   GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
 
   device_class->set_surface_cursor = gdk_broadway_device_set_surface_cursor;
-  device_class->query_state = gdk_broadway_device_query_state;
   device_class->grab = gdk_broadway_device_grab;
   device_class->ungrab = gdk_broadway_device_ungrab;
   device_class->surface_at_position = gdk_broadway_device_surface_at_position;
@@ -79,7 +72,7 @@ gdk_broadway_device_set_surface_cursor (GdkDevice *device,
 {
 }
 
-static void
+void
 gdk_broadway_device_query_state (GdkDevice         *device,
                                  GdkSurface        *surface,
                                  GdkSurface       **child_surface,
index 3ee51db4c6a0af140e413b41961203894c66d69c..33b715924f5e5eb56e2d6e84e0f2862d3848fbf2 100644 (file)
@@ -45,6 +45,13 @@ struct _GdkBroadwayDeviceClass
 G_GNUC_INTERNAL
 GType gdk_broadway_device_get_type (void) G_GNUC_CONST;
 
+void gdk_broadway_device_query_state (GdkDevice        *device,
+                                      GdkSurface       *surface,
+                                      GdkSurface      **child_surface,
+                                      double           *win_x,
+                                      double           *win_y,
+                                      GdkModifierType  *mask);
+
 G_END_DECLS
 
 #endif /* __GDK_DEVICE_BROADWAY_H__ */
index 0f3240f83300e6d60aa424b35751b283da1d7d64..50769c7155581b348dc5d9798c67d9581dbb1ab5 100644 (file)
@@ -30,6 +30,7 @@
 #include "gdkbroadwaydisplay.h"
 #include "gdkdeviceprivate.h"
 #include "gdkdisplay-broadway.h"
+#include "gdkdevice-broadway.h"
 #include "gdkdisplay.h"
 #include "gdkdragsurfaceprivate.h"
 #include "gdkeventsource.h"
@@ -756,9 +757,7 @@ gdk_broadway_surface_get_device_state (GdkSurface      *surface,
   if (GDK_SURFACE_DESTROYED (surface))
     return FALSE;
 
-  GDK_DEVICE_GET_CLASS (device)->query_state (device, surface,
-                                              &child,
-                                              x, y, mask);
+  gdk_broadway_device_query_state (device, surface, &child, x, y, mask);
   return child != NULL;
 }